package com.wxy.ej.nosql.modules.excel.controller;

import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.rt.easyjava.common.base.Result;
import com.wxy.ej.nosql.modules.excel.service.IMessageProcess;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;


/**
 * @date 2020/10/28
 * @description
 */
@RequestMapping("/luchysheet")
@RestController
public class MessageProcessController {

    @Autowired
    private IMessageProcess messageProcess;


    @PostMapping("/innerService/process")
    public Result process(@RequestBody Map map)  {
        String gridKey = (String)map.get("gridKey");
        String messageStr = (String)map.get("message");
        JSONObject message = JSONUtil.parseObj(messageStr);
        messageProcess.process(gridKey,message);
        return Result.builder();
    }


}
